package IO;

import java.io.*;

public class CopyDemo {
    public static void main(String[] args) throws IOException, FileNotFoundException {
        FileInputStream fis = new FileInputStream("01.png");
        BufferedInputStream bis = new BufferedInputStream(fis);
        FileOutputStream fos = new FileOutputStream("01_1.png");
        BufferedOutputStream bos = new BufferedOutputStream(fos);

        int time;
        while((time=bis.read())!=-1){
            bos.write(time);
        }
        bis.close();
        bos.close();
    }
}
